}
else
{
- GdkSurface *surface;
+ GdkSurface *gl_surface;
- surface = gdk_gl_context_get_surface (self->context);
- gdk_cairo_draw_from_gl (cr, surface, self->id, GL_TEXTURE, 1,
+ gl_surface = gdk_gl_context_get_surface (self->context);
+ gdk_cairo_draw_from_gl (cr, gl_surface, self->id, GL_TEXTURE, 1,
area->x, area->y,
area->width, area->height);
}
else
{
gint64 device_idx;
- GError *error = NULL;
+ GError *error2 = NULL;
- if (!g_ascii_string_to_signed (override, 10, 0, G_MAXINT, &device_idx, &error))
+ if (!g_ascii_string_to_signed (override, 10, 0, G_MAXINT, &device_idx, &error2))
{
- g_warning ("Failed to parse %s: %s", "GDK_VULKAN_DEVICE", error->message);
- g_error_free (error);
+ g_warning ("Failed to parse %s: %s", "GDK_VULKAN_DEVICE", error2->message);
+ g_error_free (error2);
device_idx = -1;
}
{
GVariant *ret;
GError *error = NULL;
- const char *schema;
+ const char *schema_str;
GVariant *val;
GVariantIter *iter;
const char *patterns[] = { "org.gnome.*", NULL };
g_variant_get (ret, "(a{sa{sv}})", &iter);
- while (g_variant_iter_loop (iter, "{s@a{sv}}", &schema, &val))
+ while (g_variant_iter_loop (iter, "{s@a{sv}}", &schema_str, &val))
{
GVariantIter *iter2 = g_variant_iter_new (val);
const char *key;
while (g_variant_iter_loop (iter2, "{sv}", &key, &v))
{
- TranslationEntry *entry = find_translation_entry_by_schema (schema, key);
+ TranslationEntry *entry = find_translation_entry_by_schema (schema_str, key);
if (entry)
{
char *a = g_variant_print (v, FALSE);
- g_debug ("Using portal setting for %s %s: %s\n", schema, key, a);
+ g_debug ("Using portal setting for %s %s: %s\n", schema_str, key, a);
g_free (a);
apply_portal_setting (entry, v, display);
}
else
{
- g_debug ("Ignoring portal setting for %s %s", schema, key);
+ g_debug ("Ignoring portal setting for %s %s", schema_str, key);
}
}
g_variant_iter_free (iter2);
GBytes *bytes;
GError *error = NULL;
+ display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
+
bytes = g_input_stream_read_bytes_finish (stream, res, &error);
if (bytes == NULL)
{
- GdkDisplay *display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
GDK_DISPLAY_NOTE (display, CLIPBOARD,
g_printerr ("%s: error reading TARGETS: %s\n", cb->selection, error->message));
g_error_free (error);
g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes) / sizeof (Atom));
- display = gdk_clipboard_get_display (GDK_CLIPBOARD (cb));
formats = gdk_x11_clipboard_formats_from_atoms (display,
g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes) / sizeof (Atom));
if (GDK_DISPLAY_DEBUG_CHECK (display, DND))
{
GString *action_str = g_string_new (NULL);
- GdkDragAction actions = gdk_drop_get_actions (drop);
- if (actions & GDK_ACTION_MOVE)
+ GdkDragAction drop_actions = gdk_drop_get_actions (drop);
+ if (drop_actions & GDK_ACTION_MOVE)
g_string_append(action_str, "MOVE ");
- if (actions & GDK_ACTION_COPY)
+ if (drop_actions & GDK_ACTION_COPY)
g_string_append(action_str, "COPY ");
- if (actions & GDK_ACTION_LINK)
+ if (drop_actions & GDK_ACTION_LINK)
g_string_append(action_str, "LINK ");
- if (actions & GDK_ACTION_ASK)
+ if (drop_actions & GDK_ACTION_ASK)
g_string_append(action_str, "ASK ");
g_message("Xdnd actions = %s", action_str->str);
for (i = 0; i < x11_display->monitors->len; i++)
{
- GdkX11Monitor *monitor = x11_display->monitors->pdata[i];
+ monitor = x11_display->monitors->pdata[i];
monitor->add = FALSE;
monitor->remove = TRUE;
}
for (i = x11_display->monitors->len - 1; i >= 0; i--)
{
- GdkX11Monitor *monitor = x11_display->monitors->pdata[i];
+ monitor = x11_display->monitors->pdata[i];
if (monitor->add)
{
gdk_display_monitor_added (GDK_DISPLAY (x11_display), GDK_MONITOR (monitor));
gpointer user_data)
{
const char *mime_type, *selection, *target, *property;
- gsize i;
selection = gdk_x11_get_xatom_name_for_display (display, xselection);
target = gdk_x11_get_xatom_name_for_display (display, xtarget);
}
else
{
+ gsize i;
+
for (i = 0; i < G_N_ELEMENTS (special_targets); i++)
{
if (g_str_equal (target, special_targets[i].x_target) &&
}
};
int indices[4] = { 0, 1, 2, 3 };
- int i;
/* We sort them by color */
sort_border_sides (colors, indices);
if (is_offscreen)
{
- GskQuadVertex vertex_data[GL_N_VERTICES] = {
+ GskQuadVertex offscreen_vertex_data[GL_N_VERTICES] = {
{ { min_x, min_y }, { 0, 1 }, },
{ { min_x, max_y }, { 0, 0 }, },
{ { max_x, min_y }, { 1, 1 }, },
{ { max_x, min_y }, { 1, 1 }, },
};
- ops_draw (builder, vertex_data);
+ ops_draw (builder, offscreen_vertex_data);
}
else
{
if (is_offscreen)
{
- GskQuadVertex vertex_data[GL_N_VERTICES] = {
+ GskQuadVertex offscreen_vertex_data[GL_N_VERTICES] = {
{ { min_x, min_y }, { 0, 1 }, },
{ { min_x, max_y }, { 0, 0 }, },
{ { max_x, min_y }, { 1, 1 }, },
{ { max_x, min_y }, { 1, 1 }, },
};
- ops_draw (builder, vertex_data);
+ ops_draw (builder, offscreen_vertex_data);
}
else
{
ops_set_texture (builder, texture_id);
if (is_offscreen)
{
- const GskQuadVertex vertex_data[GL_N_VERTICES] = {
+ const GskQuadVertex offscreen_vertex_data[GL_N_VERTICES] = {
{ { dx + min_x, dy + min_y }, { 0, 1 }, },
{ { dx + min_x, dy + max_y }, { 0, 0 }, },
{ { dx + max_x, dy + min_y }, { 1, 1 }, },
{ { dx + max_x, dy + min_y }, { 1, 1 }, },
};
- ops_draw (builder, vertex_data);
+ ops_draw (builder, offscreen_vertex_data);
}
else
{
- const GskQuadVertex vertex_data[GL_N_VERTICES] = {
+ const GskQuadVertex onscreen_vertex_data[GL_N_VERTICES] = {
{ { dx + min_x, dy + min_y }, { 0, 0 }, },
{ { dx + min_x, dy + max_y }, { 0, 1 }, },
{ { dx + max_x, dy + min_y }, { 1, 0 }, },
{ { dx + max_x, dy + min_y }, { 1, 0 }, },
};
- ops_draw (builder, vertex_data);
+ ops_draw (builder, onscreen_vertex_data);
}
ops_offset (builder, - dx, - dy);
break;
case GSK_VULKAN_OP_PUSH_VERTEX_CONSTANTS:
- for (int i = 0; i < layout_count; i++)
+ for (int j = 0; j < layout_count; j++)
gsk_vulkan_push_constants_push (&op->constants.constants,
command_buffer,
- pipeline_layout[i]);
+ pipeline_layout[j]);
break;
case GSK_VULKAN_OP_CROSS_FADE:
if (priv->insert_pos >= 0)
{
- gint pos, start, end;
pos = priv->insert_pos;
gtk_editable_get_selection_bounds (editable, &start, &end);
if (!((start <= pos && pos <= end) || (end <= pos && pos <= start)))
if (button == GDK_BUTTON_SECONDARY)
{
- GtkWidget *button = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
+ GtkWidget *button_widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
double diff;
- if (button == priv->down_button)
+ if (button_widget == priv->down_button)
{
diff = gtk_adjustment_get_value (priv->adjustment) - gtk_adjustment_get_lower (priv->adjustment);
if (diff > EPSILON)
gtk_spin_button_real_spin (spin_button, -diff);
}
- else if (button == priv->up_button)
+ else if (button_widget == priv->up_button)
{
diff = gtk_adjustment_get_upper (priv->adjustment) - gtk_adjustment_get_value (priv->adjustment);
if (diff > EPSILON)
'-Wmissing-format-attribute',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
- '-Wmissing-declarations',
- '-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
'-Wpointer-arith',
+ '-Wshadow',
'-Wstrict-prototypes',
'-Wswitch-default',
'-Wswitch-enum',
'-Wundef',
+ '-Wuninitialized',
'-Wunused',
'-Werror=address',
'-Werror=array-bounds',
'-Werror=int-to-pointer-cast',
'-Werror=main',
'-Werror=missing-braces',
+ '-Werror=missing-declarations',
+ '-Werror=missing-prototypes',
'-Werror=nonnull',
'-Werror=pointer-to-int-cast',
'-Werror=redundant-decls',